#!/usr/bin/env python
import numpy as np

from .trajectory import Trajectory


class master_trajectory_point(object, Trajectory):
    def __init__(self, delta):
        Trajectory.__init__(self)
        self.delta = delta
   
    def get_position_at(self, t):
        super(master_trajectory_save, self).get_position_at(t)
        index = int(t/self.delta) % 4
        if index == 0:  #top_right
            self.pose.x = 110
            self.pose.y = 0
        if index == 1:  #top_left
            self.pose.x = 110
            self.pose.y = 45
        if index == 2:  #low_left
            self.pose.x = -15
            self.pose.y = 45
        if index == 3:  #low_right
            self.pose.x = -15
            self.pose.y = 0

        return self.position

    def get_name(self):
        return str(master_trajectory_point.__name__).replace('Trajectory', '').lower()
